﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;

using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;

namespace Movies
{
    public partial class FormBrowserFile : Form
    {
        public FormBrowserFile()
        {
            InitializeComponent();
        }

        private String urlLocal="about:blank";
        public FormBrowserFile(String url)
        {
            InitializeComponent();
            urlLocal = url;
        }

        private void MovieDetails_Load(object sender, EventArgs e)
        {
            Uri url = new Uri(urlLocal);

            internalBrowser.Url = url;
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void launchButton_Click(object sender, EventArgs e)
        {
            String urlLocalTemp = urlLocal;
            urlLocalTemp = urlLocalTemp.Substring(0,urlLocalTemp.LastIndexOf("\\")+1);
            String[] avis=Directory.GetFileSystemEntries(urlLocalTemp, "*.avi,*.mkv");
            foreach (String file in avis)
            {
            }
            Process.Start("explorer", urlLocalTemp);
        }
    }
}
